﻿using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Microsoft.AspNetCore.Http;
using OplugFramework.Portal.Dto;
using System;
using System.Threading.Tasks;

namespace OplugFramework.Portal
{

    public interface IAttachmentAppService : IAsyncCrudAppService<AttachmentDto, Guid, PagedResultRequestDto, CreateAttachmentDto, UpdateAttachmentDto>
    {
        Task<string> UploadFiles(IFormFile[] files, string objectId = "", string objectName = "", string objectField = "");
        Task<byte[]> GetFileAsync(string sysRowId);
        /// <summary>
        /// 获取缓存文件
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        byte[] GetFileCache(string key);
    }
}